package com.shujia.duotai_work.exer;

public class BaconPizza extends Pizza {

    private int baconWeight;

    public BaconPizza() {
    }

    public BaconPizza(double price, String size, int baconWeight) {
        super("培根披萨", price, size);
        this.baconWeight = baconWeight;
    }

    @Override
    public void display() {
        System.out.println("名称:" + getName());
        System.out.println("价格:" + getPrice());
        System.out.println("大小:" + getSize());
        System.out.println("培根克数:" + baconWeight);
    }
}
